package com.wzcl.app.dao.model;

import com.wzcl.app.dao.model.common.Base;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@Table(name = "requisition",
        indexes = {
                @Index(columnList = "userPhone")
        }
)
@ApiModel(value = "申请单")
@EntityListeners(AuditingEntityListener.class)
public class Requisition implements Base {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @ApiModelProperty(value = "创建时间")
    @CreatedDate
    private Date createTime;

    @ApiModelProperty(name = "年级id")
    private Integer gradeId;

    @ApiModelProperty(name = "年级")
    private String gradeName;

    @ApiModelProperty(name = "学科Id")
    private Integer subjectId;

    @ApiModelProperty(name = "学科")
    private String subjectName;

    @ApiModelProperty(name = "用户id")
    private Integer userId;

    @ApiModelProperty(name = "用户手机")
    private String userPhone;

    @ApiModelProperty(name = "用户真实姓名")
    private String userRealName;

    @ApiModelProperty(name = "处理结果")
    private String result;

    @ApiModelProperty(name = "加星标记")
    private Boolean star;

    @ApiModelProperty(value = "进度")
    private Integer schedule;
}
